﻿using DapperExtensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RightControl.Model {
    [Table("sub_product_img")]
    public class SubProductImage : Entity {

        public int ProductId { get; set; }
        public string Color { get; set; }

        public string OriColor { get; set; }
        public string DhAttribute { get; set; }
        public string MainImage { get; set; }
        public string Image01 { get; set; }
        public string Image02 { get; set; }
        public string Image03 { get; set; }

        public string Image04 { get; set; }
        public string Image05 { get; set; }
        public string Image06 { get; set; }
        public string Image07 { get; set; }
        public string Image08 { get; set; }
        public string Image09 { get; set; }

        public SubProductImage() { }

        public SubProductImage(int prodcutId, string color = "", string imgUrl = "", int userId = 0) {
            ProductId = prodcutId;
            Color = color;
            OriColor = color;
            MainImage = imgUrl;
            CreateOn = DateTime.Now;
            CreateBy = userId;
            Image01 = "/Areas/Admin/Content/images/no_img.jpg";
            Image02 = Image01;
            Image03 = Image01;
            Image04 = Image01;
            Image05 = Image01;
            Image06 = Image01;
            Image07 = Image01;
            Image08 = Image01;
            Image09 = Image01;
        }
    }
}
